package com.oocl.main;

import java.io.IOException;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.SAXException;

import com.oocl.dataproduce.DataProducer;
import com.oocl.xmlparser.MessageProduceHandler;

public class ProduceMainProcedure {
   public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException {
	   DataProducer  dataProducer = new DataProducer();
	   dataProducer.dataProduce();
	  SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
	  MessageProduceHandler handler = new MessageProduceHandler();
	  parser.parse("data.xml", handler);
	 System.out.println("消息产生结束");
   }
}
